package com.credit.management.system.generator.dao;

import com.credit.management.system.model.Syroleauthority;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface SyroleauthorityMapper {
    @Delete({
        "delete from syroleauthority",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    @Insert({
        "insert into syroleauthority (id, roleid, ",
        "authid)",
        "values (#{id,jdbcType=INTEGER}, #{roleid,jdbcType=INTEGER}, ",
        "#{authid,jdbcType=INTEGER})"
    })
    int insert(Syroleauthority record);

    int insertSelective(Syroleauthority record);

    @Select({
        "select",
        "id, roleid, authid",
        "from syroleauthority",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @ResultMap("com.credit.management.system.generator.dao.SyroleauthorityMapper.BaseResultMap")
    Syroleauthority selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Syroleauthority record);

    @Update({
        "update syroleauthority",
        "set roleid = #{roleid,jdbcType=INTEGER},",
          "authid = #{authid,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Syroleauthority record);
}